<?php 
	ini_set("include_path", ".:../:./includes:../includes");

	require_once("includes/constants.php");
	require_once("includes/database.php");
	require_once("includes/common.php");
	require_once("includes/template.php"); 
	head("View Shipping Options");
	if (!isset($_SESSION[SHIPPING])) $_SESSION[SHIPPING] =getAllShippingOptions(); //for the first time
?>
<?php if (!isset($_SESSION[SHIPPING])) { ?>
	There are no saved shipping options.
<?php } else { ?>
<table cellspacing="5px"  width="100%">	
	<tr>
		<td>
			&nbsp;
		</td>
		<td class="button1">
			Service Name
		</td>		
		<td class="button1">
			Status
		</td>		
	</tr>
	<?php 
		$count = count($_SESSION[SHIPPING]);
	 	foreach ($_SESSION[SHIPPING] as $index =>$shippingOption) {
	?>
	<input type="hidden" name="shippingOptionCount" id="shippingOptionCount" value=<?php echo $count; ?> />
	<tr >
		<td align="right">
			<input type=radio id="selectedShippingOption<?php echo $index; ?>" name="selectedShippingOption" value="<?php echo $index;?>" /> 
		</td>
		<td class="button2">
			<?php echo $_SESSION[SHIPPING][$index]['ds_service_name']; ?>
		</td>		
		<td class="button2">
			<?php echo $_SESSION[SHIPPING][$index]['ds_status']; ?>
		</td>
	</tr>	
	<?php 	
		}
	?>
</table>
<?php } ?>
<?php foot("VIEW","manageShippingOption.php?" .  "operation=view",
			"UPDATE", "manageShippingOption.php?"  . "operation=update", 
			"DELETE", "deleteShippingOption.php "  ); ?>


